home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / unarced / utilities / system / intuition / shadow / examples / gui / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-17  |  4.4 KB  |  146 lines

  1.  
  2. #ifndef SHADOW_GUI_H
  3. #define SHADOW_GUI_H
  4.  
  5. #include <exec/exec.h>
  6. #include <proto/exec.h>
  7. #include <proto/dos.h>
  8. #include <intuition/intuition.h>
  9. #include <proto/intuition.h>
  10. #include <libraries/gadtools.h>
  11. #include <proto/gadtools.h>
  12. #include <shadow/watcher.h>
  13.  
  14. /*
  15.  * ==========================================================================
  16.  * =                                                                        =
  17.  * =           Class definition for the GUI process.                        =
  18.  * =                                                                        =
  19.  * ==========================================================================
  20.  */
  21. #ifndef GUIPROCESSCLASS
  22. #define GUIPROCESSCLASS "gui process class"
  23. #endif
  24.  
  25. #ifndef GUITASK
  26. #define GUITASK "Gui Task\0"
  27. #endif
  28.  
  29. #define ATTR_GUIPROCESS "shared window port\0"
  30. struct GuiProcess {
  31.    struct MsgPort *guip_port;
  32. };
  33.  
  34. void HandleIntuiMessage(struct IntuiMessage *intui);
  35. void GUIThreadStart(void);
  36.  
  37.  
  38. /*
  39.  * ==========================================================================
  40.  * =                                                                        =
  41.  * =           Class definition for GUI type of objects.                    =
  42.  * =                                                                        =
  43.  * ==========================================================================
  44.  */
  45. #ifndef GUICLASS
  46. #define GUICLASS        "gui class"
  47. #endif
  48.  
  49. #define ATTR_GUICHILDREN   "gui children\0"
  50. #define ATTR_GUISTRUCT     "gui struct\0"
  51. struct GUIStruct {
  52.    OBJECT gui_parent;
  53.    char   *gui_moniker;
  54. };
  55.  
  56. #define ATTR_GUIOUTPUT     "gui output\0"
  57. struct OutputStruct {
  58.    OBJECT out_object;
  59.    char   *out_method;
  60. };
  61.  
  62. extern METHOD_REF REF_GuiInitMethod[];
  63.  
  64. void *GuiInitMethod(METHOD_ARGS, OBJECT parent,
  65.                                  char   *name,
  66.                                  OBJECT out_object,
  67.                                  char   *out_method);
  68. void GuiRemoveMethod(METHOD_ARGS);
  69. void GuiDestroyMethod(METHOD_ARGS);
  70.  
  71. /*
  72.  * ==========================================================================
  73.  * =                                                                        =
  74.  * =           Class definition for window objects.                         =
  75.  * =                                                                        =
  76.  * ==========================================================================
  77.  */
  78.  
  79. #ifndef WINDOWCLASS
  80. #define WINDOWCLASS     "Window Class\0"
  81. #endif
  82.  
  83. #define ATTR_WINDOW     "window attributes"
  84. struct WindowObject {
  85.    struct Window *wo_window;
  86.    /*
  87.     * Should really be a pointer to a screen Object, but....
  88.     */
  89.    struct VisualInfo *wo_vi;
  90.  
  91.    /*
  92.     * Will eventually need menus here, too.
  93.     */
  94.    struct Gadget *wo_rootGadget, *wo_lastGadget;
  95. };
  96.  
  97. #define METHOD_WINDOW_CLOSE   METHOD_META_REMOVE
  98. #define METHOD_WINDOW_REFRESH "Method window refresh"
  99. #define METHOD_GADGET_SELECT  "Method gadget select\0"
  100.  
  101. extern METHOD_REF REF_WinOpenMethod[];
  102.  
  103. void *WinOpenMethod(METHOD_ARGS, OBJECT parent,
  104.                                  char *name,
  105.                                  OBJECT out_object,
  106.                                  char *out_method,
  107.                                  struct TagItem *tags);
  108. void WinCloseMethod(METHOD_ARGS);
  109. void WinDestroyMethod(METHOD_ARGS);
  110.  
  111.  
  112. /*
  113.  * ==========================================================================
  114.  * =                                                                        =
  115.  * =           Class definition for GADTOOL gadget objects.                 =
  116.  * =                                                                        =
  117.  * ==========================================================================
  118.  */
  119.  
  120. #ifndef GADGTCLASS
  121. #define GADGTCLASS    "Gadget GadTool Class\0"
  122. #endif
  123.  
  124. #define ATTR_GADGET   "gadget base offset\0"
  125.  
  126. struct GadgetObject {
  127.    struct Gadget *go_gadget;
  128. };
  129.  
  130. extern METHOD_REF REF_GadgTOpenMethod[], REF_GadgTChangeMethod[];
  131.  
  132. void *GadgTOpenMethod(METHOD_ARGS, OBJECT window,
  133.                                    char *name,
  134.                                    OBJECT out_object,
  135.                                    char *out_method,
  136.                                    struct NewGadget *ng,
  137.                                    long gadType,
  138.                                    struct TagItem *tags);
  139.  
  140.  
  141. #define METHOD_GADGET_CHANGE "Method Change gadtool attrs"
  142. void GadgTChangeMethod(METHOD_ARGS, struct TagItem *tags);
  143.  
  144. BOOL InitGUISystem(void);
  145.  
  146. #endif